<?php
/**
 * CreateUser:zlh
 * CreateTime:2022/1/15
 * Remark:该类用于对状态码枚举处理
 */
namespace App\Enum\ResponseEnum;

use App\Consts\ResponseConsts\ResponseStatusConsts;
use App\Enum\BaseEnumInterface;

class ResponseStatusEnum implements BaseEnumInterface
{

    public static function getEnumMeaningByEnumCode($enumCode) : string
    {
        switch ($enumCode){
            case ResponseStatusConsts::OK_200_RESPONSE_STATUS:
                return "Ok";
            case ResponseStatusConsts::CREATED_201_RESPONSE_STATUS:
                return "Created";
            case ResponseStatusConsts::NO_CONTENT_204_RESPONSE_STATUS;
                return "No Content";
            case ResponseStatusConsts::BAD_REQUEST_400_RESPONSE_STATUS:
                return "Bad Request";
            case ResponseStatusConsts::UNAUTHORIZED_401_RESPONSE_STATUS:
                return "Unauthorized";
            case ResponseStatusConsts::FORBIDDEN_403_RESPONSE_STATUS:
                return "Forbidden";
            case ResponseStatusConsts::NOT_FOUND_404_RESPONSE_STATUS:
                return "Not Found";
            case ResponseStatusConsts::METHOD_NOT_ALLOWED_405_RESPONSE_STATUS:
                return "Method Not Allowed";
            case ResponseStatusConsts::INTERNAL_SERVER_ERROR_500_RESPONSE_STATUS:
                return "Internal Server Error";
        }
    }
}